package org.dftproject.genesis.ui.pages.summary.details;

import org.dftproject.genesis.ui.figures.UniformSizeContainer;
import org.dftproject.genesis.ui.figures.UniformSizeGroup;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.PositionConstants;
import org.eclipse.draw2d.ToolbarLayout;

public class RoleFigure extends Figure {
	
	public RoleFigure(String name, IFigure value, UniformSizeGroup uniformSizeGroup) {
		ToolbarLayout layout = new ToolbarLayout(true);
		layout.setSpacing(10);
		setLayoutManager(layout);
		
		Label label = new Label(name);
		label.setLabelAlignment(PositionConstants.RIGHT);
		add(new UniformSizeContainer(label, uniformSizeGroup));
		
		add(value);
	}

}
